Skip to content

Conversation

@robyww
Copy link
Contributor

@robyww robyww commented Jan 9, 2026

Firefly-1926: optimizing tile generation, transfer, and memory usage

  • Transfer each image tile individually instead of one large data array
  • Server not longer copies tiles into a single byte array from tiles, saving server memory
  • Client not longer parses and copies single byte array into tile array, saving client memory
  • Client makes a single call per tile and processes the image after it is retrieved, while other tiles are being retrieved
    • creates better use of worker thread, using CPU/GPU while retrieving another tile
  • Client JobRunner.js acts as a batch queue to control how many calls are made at a time
    • currently does 3 at a time
    • keeps from overwhelming the server with many concurrent calls

Testing

@robyww robyww added this to the 2026.1 milestone Jan 9, 2026
@robyww robyww self-assigned this Jan 9, 2026
@robyww robyww added the Image FITS images label Jan 9, 2026
@robyww robyww requested a review from loitly January 10, 2026 01:28
@robyww robyww force-pushed the FIREFLY-1926-concurrent-grid branch from 2d59306 to 9d2c007 Compare January 13, 2026 23:00
Copy link
Contributor

@loitly loitly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The developer walked me through the changes in this PR. It looks like a solid improvement for both the server and client sides. I suggested testing it with one of our most demanding scenario, such as a grid of large images being stretched at the same time. If that works as expected, the PR is good to go.

  - Transfer each image tile individually instead of one large data array
  - Server not longer copies tiles into a single byte array from tiles, saving server memory
  - Client not longer parsees and copies single byte array into tiles, saving client memory
  - Client makes a single call per tile and processes the image after it is retrieved, while other tile are being retrieved
     - creates better use of worker thread, using CPU/GPU will retrieving a tile
  - Client JobRunner act as a batch queue to control how many call are made at a time
     - keeps from overwhelming the server with many concurrent calls
  - support sending messages from worker
@robyww robyww force-pushed the FIREFLY-1926-concurrent-grid branch from 9d2c007 to 1ef378f Compare January 14, 2026 17:42
@robyww
Copy link
Contributor Author

robyww commented Jan 14, 2026

Also tested with Euclid with a full grid of images, about 12.5 GB

@robyww robyww merged commit 0c1e2a1 into dev Jan 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Image FITS images

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants